package org.gd.hellojaxb.privat24.chart;

import javax.xml.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "pay")
public class ChartPayModel {

    @XmlAttribute(name = "userid")
    private int userid;
    @XmlElement(name = "date_in")
    private Date date_in;
    @XmlElement(name = "date_out")
    private Date date_out;
    @XmlElement(name = "state")
    private String state;
    @XmlElement(name = "link")
    private String link;
    @XmlElement(name = "a_card")
    private String a_card;
    @XmlElement(name = "a_account")
    private String a_account;
    @XmlElement(name = "details")
    private String details;
    @XmlElement(name = "type")
    private String type;
    @XmlElement(name = "ccy")
    private String ccy;
    @XmlElement(name = "amt")
    private String amt;
    @XmlElement(name = "b_card_or_acc")
    private String b_card_or_acc;
    @XmlElement(name = "b_name")
    private String b_name;
    @XmlElement(name = "b_crf")
    private String b_crf;
    @XmlElement(name = "b_bic")
    private String b_bic;
    @XmlAttribute(name = "id")
    private int id;
    @XmlElement(name = "pu_isPaymCommunal")
    private String pu_isPaymCommunal;
    @XmlElement(name = "pu_ServiceCode")
    private String pu_ServiceCode;
    @XmlElement(name = "pu_INN")
    private String pu_INN;
    @XmlElement(name = "pu_ClientName")
    private String pu_ClientName;
    @XmlElement(name = "pu_Address")
    private String pu_Address;
    @XmlElement(name = "pu_Phone")
    private String pu_Phone;
    @XmlElement(name = "pu_PersonalAcc")
    private String pu_PersonalAcc;
    @XmlElement(name = "pu_CityCode")
    private String pu_CityCode;
    @XmlElement(name = "pu_Additional")
    private String pu_Additional;
    @XmlElement(name = "pu_CounterStart")
    private String pu_CounterStart;
    @XmlElement(name = "pu_CounterEnd")
    private String pu_CounterEnd;
    @XmlElement(name = "notice_phone")
    private String notice_phone;
    @XmlElement(name = "notice_status")
    private String notice_status;
    @XmlElement(name = "ModuleID")
    private String ModuleID;
    @XmlElement(name = "upddate")
    private String upddate;/*timestamp*/
    @XmlElement(name = "cert")
    private String cert;
    @XmlElement(name = "comission_a")
    private String comission_a;
    @XmlElement(name = "show_comiss")
    private String show_comiss;

    public ChartPayModel() {
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public Date getDate_in() {
        return date_in;
    }

    public void setDate_in(Date date_in) {
        this.date_in = date_in;
    }

    public Date getDate_out() {
        return date_out;
    }

    public void setDate_out(Date date_out) {
        this.date_out = date_out;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getA_card() {
        return a_card;
    }

    public void setA_card(String a_card) {
        this.a_card = a_card;
    }

    public String getA_account() {
        return a_account;
    }

    public void setA_account(String a_account) {
        this.a_account = a_account;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCcy() {
        return ccy;
    }

    public void setCcy(String ccy) {
        this.ccy = ccy;
    }

    public String getAmt() {
        return amt;
    }

    public void setAmt(String amt) {
        this.amt = amt;
    }

    public String getB_card_or_acc() {
        return b_card_or_acc;
    }

    public void setB_card_or_acc(String b_card_or_acc) {
        this.b_card_or_acc = b_card_or_acc;
    }

    public String getB_name() {
        return b_name;
    }

    public void setB_name(String b_name) {
        this.b_name = b_name;
    }

    public String getB_crf() {
        return b_crf;
    }

    public void setB_crf(String b_crf) {
        this.b_crf = b_crf;
    }

    public String getB_bic() {
        return b_bic;
    }

    public void setB_bic(String b_bic) {
        this.b_bic = b_bic;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPu_isPaymCommunal() {
        return pu_isPaymCommunal;
    }

    public void setPu_isPaymCommunal(String pu_isPaymCommunal) {
        this.pu_isPaymCommunal = pu_isPaymCommunal;
    }

    public String getPu_ServiceCode() {
        return pu_ServiceCode;
    }

    public void setPu_ServiceCode(String pu_ServiceCode) {
        this.pu_ServiceCode = pu_ServiceCode;
    }

    public String getPu_INN() {
        return pu_INN;
    }

    public void setPu_INN(String pu_INN) {
        this.pu_INN = pu_INN;
    }

    public String getPu_ClientName() {
        return pu_ClientName;
    }

    public void setPu_ClientName(String pu_ClientName) {
        this.pu_ClientName = pu_ClientName;
    }

    public String getPu_Address() {
        return pu_Address;
    }

    public void setPu_Address(String pu_Address) {
        this.pu_Address = pu_Address;
    }

    public String getPu_Phone() {
        return pu_Phone;
    }

    public void setPu_Phone(String pu_Phone) {
        this.pu_Phone = pu_Phone;
    }

    public String getPu_PersonalAcc() {
        return pu_PersonalAcc;
    }

    public void setPu_PersonalAcc(String pu_PersonalAcc) {
        this.pu_PersonalAcc = pu_PersonalAcc;
    }

    public String getPu_CityCode() {
        return pu_CityCode;
    }

    public void setPu_CityCode(String pu_CityCode) {
        this.pu_CityCode = pu_CityCode;
    }

    public String getPu_Additional() {
        return pu_Additional;
    }

    public void setPu_Additional(String pu_Additional) {
        this.pu_Additional = pu_Additional;
    }

    public String getPu_CounterStart() {
        return pu_CounterStart;
    }

    public void setPu_CounterStart(String pu_CounterStart) {
        this.pu_CounterStart = pu_CounterStart;
    }

    public String getPu_CounterEnd() {
        return pu_CounterEnd;
    }

    public void setPu_CounterEnd(String pu_CounterEnd) {
        this.pu_CounterEnd = pu_CounterEnd;
    }

    public String getNotice_phone() {
        return notice_phone;
    }

    public void setNotice_phone(String notice_phone) {
        this.notice_phone = notice_phone;
    }

    public String getNotice_status() {
        return notice_status;
    }

    public void setNotice_status(String notice_status) {
        this.notice_status = notice_status;
    }

    public String getModuleID() {
        return ModuleID;
    }

    public void setModuleID(String moduleID) {
        ModuleID = moduleID;
    }

    public String getUpddate() {
        return upddate;
    }

    public void setUpddate(String upddate) {
        this.upddate = upddate;
    }

    public String getCert() {
        return cert;
    }

    public void setCert(String cert) {
        this.cert = cert;
    }

    public String getComission_a() {
        return comission_a;
    }

    public void setComission_a(String comission_a) {
        this.comission_a = comission_a;
    }

    public String getShow_comiss() {
        return show_comiss;
    }

    public void setShow_comiss(String show_comiss) {
        this.show_comiss = show_comiss;
    }

    public Map<String, String> toMap() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", new Locale("UA"));
        Map<String, String> map = new HashMap<String, String>();
        /* 001 */ map.put("id", Integer.toString(id));
        /* 002 */ map.put("userid", Integer.toString(userid));
        /* 003 */ map.put("date_in", dateFormat.format(date_in));
        /* 004 */ map.put("date_out", dateFormat.format(date_out));
        /* 005 */ map.put("state", state);
        /* 006 */ map.put("link", link);
        /* 007 */ map.put("a_card", a_card);
        /* 008 */ map.put("a_account", a_account);
        /* 009 */ map.put("details", details);
        /* 000 */ map.put("type", type);
        /* 011 */ map.put("ccy", ccy);
        /* 012 */ map.put("amt", amt);
        /* 013 */ map.put("b_card_or_acc", b_card_or_acc);
        /* 014 */ map.put("b_name", b_name);
        /* 015 */ map.put("b_crf", b_crf);
        /* 016 */ map.put("b_bic", b_bic);
        /* 017 */ map.put("comission_a", comission_a);
        /* 018 */ map.put("pu_isPaymCommunal", pu_isPaymCommunal);
        /* 019 */ map.put("pu_ServiceCode", pu_ServiceCode);
        /* 020 */ map.put("pu_INN", pu_INN);
        /* 021 */ map.put("pu_ClientName", pu_ClientName);
        /* 022 */ map.put("pu_Address", pu_Address);
        /* 023 */ map.put("pu_Phone", pu_Phone);
        /* 024 */ map.put("pu_PersonalAcc", pu_PersonalAcc);
        /* 025 */ map.put("pu_CityCode", pu_CityCode);
        /* 026 */ map.put("pu_Additional", pu_Additional);
        /* 027 */ map.put("pu_CounterStart", pu_CounterStart);
        /* 028 */ map.put("pu_CounterEnd", pu_CounterEnd);
        /* 029 */ map.put("notice_phone", notice_phone);
        /* 030 */ map.put("notice_status", notice_status);
        /* 031 */ map.put("show_comiss", show_comiss);
        /* 032 */ map.put("module_id", ModuleID==null?"-":ModuleID);

        return map;
    }
}
